/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bms;

import java.awt.Color;
import javax.swing.text.DefaultCaret;

/**
 *
 * @author Michal
 */
public class GUI extends javax.swing.JFrame {

    public static float[] cold = {10, 15}, calm = {10, 15, 15, 23}, perfect = {15, 20, 26}, warm = {17, 25, 25, 30}, hot = {25, 30};
//    public static float[] cold = {0, 10}, calm = {14, 5}, perfect = {19, 1}, warm = {24, 5}, hot = {40, 10};
    public static int cold_fun = 3, calm_fun = 2, perfect_fun = 1, warm_fun = 2, hot_fun = 0;
//    public static int cold_fun = 4, calm_fun = 4, perfect_fun = 4, warm_fun = 4, hot_fun = 4;
    public static Regula[] p = {new Regula(0, 0, 19, 0)};
    private static boolean local = false, advanced = false;

    /**
     * Creates new form GUI
     */
    public GUI() {
        initComponents();
        DefaultCaret caret = (DefaultCaret) jTextArea1.getCaret();
        caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);
    }

    static void log(String log) {
        jTextArea1.append(log + "\n");
        jTextArea1.setCaretPosition(jTextArea1.getDocument().getLength());
    }

    public static boolean isLocal() {
        return local;
    }

    public static boolean isAdvanced() {
        return advanced;
    }

    public static void setTemp(float t1, float t2) {
        jProgressBar1.setValue((int) t1);
        jProgressBar1.setString(String.valueOf(t1) + " °C");
        jProgressBar2.setValue((int) t2);
        jProgressBar2.setString(String.valueOf(t2) + " °C");
    }

    public static void setDecisionProgressBar(float d, int i) {
        switch (i) {
            case 0:
                jProgressBar3.setValue((int) (50 * d + 50));
                jProgressBar3.setString(String.valueOf(d));
                if (d > 0) {
                    jLabel41.setText("Heating");
                    jLabel41.setForeground(Color.red);
                    jProgressBar3.setForeground(Color.red);
                } else if (d < 0) {
                    jLabel41.setText("Cooling");
                    jLabel41.setForeground(Color.blue);
                    jProgressBar3.setForeground(Color.blue);
                } else {
                    jLabel41.setText("Nothing");
                    jLabel41.setForeground(Color.black);
                    jProgressBar3.setForeground(Color.black);
                }

                break;
            case 1:
                jProgressBar4.setValue((int) (50 * d + 50));
                jProgressBar4.setString(String.valueOf(d));
                if (d > 0) {
                    jLabel40.setText("Heating");
                    jLabel40.setForeground(Color.red);
                    jProgressBar4.setForeground(Color.red);
                } else if (d < 0) {
                    jLabel40.setText("Cooling");
                    jLabel40.setForeground(Color.blue);
                    jProgressBar4.setForeground(Color.blue);
                } else {
                    jLabel40.setText("Nothing");
                    jLabel40.setForeground(Color.black);
                    jProgressBar4.setForeground(Color.black);
                }
                break;
        }
    }

    public static void setSliders(float t, int i) {
        if (!local || !advanced) {
            switch (i) {
                case 0:
                    jSlider1.setValue((int) t);
                    break;
                case 1:
                    jSlider2.setValue((int) t);
                    break;
            }
        }
    }

    public static Regula[] getSliders(int i) {
        Regula[] r = new Regula[2];
        switch (i) {
            case 0:
                r[0] = new Regula(0, 0, jSlider1.getValue(), 0);
                break;
            case 1:
                r[0] = new Regula(0, 0, jSlider2.getValue(), 0);
                break;
        }
        return r;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenu2 = new javax.swing.JMenu();
        jMenu3 = new javax.swing.JMenu();
        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        buttonGroup4 = new javax.swing.ButtonGroup();
        buttonGroup5 = new javax.swing.ButtonGroup();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jPanel1 = new javax.swing.JPanel();
        jCheckBox2 = new javax.swing.JCheckBox();
        jPanel2 = new javax.swing.JPanel();
        jProgressBar1 = new javax.swing.JProgressBar();
        jLabel36 = new javax.swing.JLabel();
        jProgressBar3 = new javax.swing.JProgressBar();
        jLabel38 = new javax.swing.JLabel();
        jLabel41 = new javax.swing.JLabel();
        jSlider1 = new javax.swing.JSlider();
        jPanel8 = new javax.swing.JPanel();
        jProgressBar2 = new javax.swing.JProgressBar();
        jLabel37 = new javax.swing.JLabel();
        jProgressBar4 = new javax.swing.JProgressBar();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        jSlider2 = new javax.swing.JSlider();
        jCheckBox1 = new javax.swing.JCheckBox();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel3 = new javax.swing.JPanel();
        jTextField1 = new javax.swing.JTextField();
        jTextField2 = new javax.swing.JTextField();
        jTextField3 = new javax.swing.JTextField();
        jTextField4 = new javax.swing.JTextField();
        jRadioButton1 = new javax.swing.JRadioButton();
        jRadioButton2 = new javax.swing.JRadioButton();
        jRadioButton3 = new javax.swing.JRadioButton();
        jRadioButton4 = new javax.swing.JRadioButton();
        jRadioButton5 = new javax.swing.JRadioButton();
        jButton1 = new javax.swing.JButton();
        jTextField5 = new javax.swing.JTextField();
        jTextField6 = new javax.swing.JTextField();
        jTextField7 = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        jTextField8 = new javax.swing.JTextField();
        jButton2 = new javax.swing.JButton();
        jRadioButton6 = new javax.swing.JRadioButton();
        jRadioButton7 = new javax.swing.JRadioButton();
        jRadioButton8 = new javax.swing.JRadioButton();
        jRadioButton9 = new javax.swing.JRadioButton();
        jLabel8 = new javax.swing.JLabel();
        jTextField9 = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jTextField10 = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jTextField11 = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        jTextField12 = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        jTextField13 = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        jTextField14 = new javax.swing.JTextField();
        jRadioButton10 = new javax.swing.JRadioButton();
        jPanel5 = new javax.swing.JPanel();
        jTextField15 = new javax.swing.JTextField();
        jButton3 = new javax.swing.JButton();
        jRadioButton11 = new javax.swing.JRadioButton();
        jRadioButton12 = new javax.swing.JRadioButton();
        jRadioButton13 = new javax.swing.JRadioButton();
        jRadioButton14 = new javax.swing.JRadioButton();
        jLabel15 = new javax.swing.JLabel();
        jTextField16 = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jTextField17 = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        jTextField18 = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        jTextField19 = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        jTextField20 = new javax.swing.JTextField();
        jLabel21 = new javax.swing.JLabel();
        jTextField21 = new javax.swing.JTextField();
        jRadioButton15 = new javax.swing.JRadioButton();
        jPanel6 = new javax.swing.JPanel();
        jTextField22 = new javax.swing.JTextField();
        jButton4 = new javax.swing.JButton();
        jRadioButton16 = new javax.swing.JRadioButton();
        jRadioButton17 = new javax.swing.JRadioButton();
        jRadioButton18 = new javax.swing.JRadioButton();
        jRadioButton19 = new javax.swing.JRadioButton();
        jLabel22 = new javax.swing.JLabel();
        jTextField23 = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        jTextField24 = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        jTextField25 = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        jTextField26 = new javax.swing.JTextField();
        jLabel27 = new javax.swing.JLabel();
        jTextField27 = new javax.swing.JTextField();
        jLabel28 = new javax.swing.JLabel();
        jTextField28 = new javax.swing.JTextField();
        jRadioButton20 = new javax.swing.JRadioButton();
        jPanel7 = new javax.swing.JPanel();
        jTextField29 = new javax.swing.JTextField();
        jButton5 = new javax.swing.JButton();
        jRadioButton21 = new javax.swing.JRadioButton();
        jRadioButton22 = new javax.swing.JRadioButton();
        jRadioButton23 = new javax.swing.JRadioButton();
        jRadioButton24 = new javax.swing.JRadioButton();
        jLabel29 = new javax.swing.JLabel();
        jTextField30 = new javax.swing.JTextField();
        jLabel30 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        jTextField31 = new javax.swing.JTextField();
        jLabel32 = new javax.swing.JLabel();
        jTextField32 = new javax.swing.JTextField();
        jLabel33 = new javax.swing.JLabel();
        jTextField33 = new javax.swing.JTextField();
        jLabel34 = new javax.swing.JLabel();
        jTextField34 = new javax.swing.JTextField();
        jLabel35 = new javax.swing.JLabel();
        jTextField35 = new javax.swing.JTextField();
        jRadioButton25 = new javax.swing.JRadioButton();
        jMenuBar2 = new javax.swing.JMenuBar();
        jMenu4 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenu5 = new javax.swing.JMenu();

        jMenu1.setText("File");
        jMenuBar1.add(jMenu1);

        jMenu2.setText("Edit");
        jMenuBar1.add(jMenu2);

        jMenu3.setText("jMenu3");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setResizable(false);

        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jScrollPane1.setViewportView(jTextArea1);

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Decision System"));

        jCheckBox2.setText("Advanced settings");
        jCheckBox2.setEnabled(false);
        jCheckBox2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox2ActionPerformed(evt);
            }
        });

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Sensor 1"));

        jProgressBar1.setMaximum(30);
        jProgressBar1.setMinimum(10);
        jProgressBar1.setOrientation(1);
        jProgressBar1.setMinimumSize(new java.awt.Dimension(17, 17));
        jProgressBar1.setString("0");
        jProgressBar1.setStringPainted(true);

        jLabel36.setText("Temperature");

        jProgressBar3.setOrientation(1);
        jProgressBar3.setValue(50);
        jProgressBar3.setMinimumSize(new java.awt.Dimension(17, 17));
        jProgressBar3.setString("0");
        jProgressBar3.setStringPainted(true);

        jLabel38.setText("Decision");

        jLabel41.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel41.setText("Nothing");

        jSlider1.setMajorTickSpacing(5);
        jSlider1.setMaximum(25);
        jSlider1.setMinimum(15);
        jSlider1.setOrientation(javax.swing.JSlider.VERTICAL);
        jSlider1.setPaintLabels(true);
        jSlider1.setPaintTicks(true);
        jSlider1.setValue(15);
        jSlider1.setEnabled(false);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)
                .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(47, 47, 47)
                .addComponent(jProgressBar3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(36, 36, 36))
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(50, 50, 50)
                .addComponent(jLabel41)
                .addGap(0, 0, Short.MAX_VALUE))
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addComponent(jLabel36)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel38)
                .addGap(22, 22, 22))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jProgressBar3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                        .addGap(27, 27, 27)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel36)
                            .addComponent(jLabel38))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel41)
                .addContainerGap(18, Short.MAX_VALUE))
        );

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder("Sensor 2"));

        jProgressBar2.setMaximum(30);
        jProgressBar2.setMinimum(10);
        jProgressBar2.setOrientation(1);
        jProgressBar2.setToolTipText("");
        jProgressBar2.setMinimumSize(new java.awt.Dimension(17, 17));
        jProgressBar2.setString("0");
        jProgressBar2.setStringPainted(true);

        jLabel37.setText("Temperature");

        jProgressBar4.setOrientation(1);
        jProgressBar4.setValue(50);
        jProgressBar4.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        jProgressBar4.setMinimumSize(new java.awt.Dimension(17, 17));
        jProgressBar4.setString("0");
        jProgressBar4.setStringPainted(true);

        jLabel39.setText("Decision");

        jLabel40.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel40.setText("Nothing");

        jSlider2.setMajorTickSpacing(5);
        jSlider2.setMaximum(25);
        jSlider2.setMinimum(15);
        jSlider2.setOrientation(javax.swing.JSlider.VERTICAL);
        jSlider2.setPaintLabels(true);
        jSlider2.setPaintTicks(true);
        jSlider2.setEnabled(false);

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel37)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jSlider2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(23, 23, 23)
                        .addComponent(jProgressBar2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGap(42, 63, Short.MAX_VALUE)
                        .addComponent(jProgressBar4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 29, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel39)
                        .addGap(20, 20, 20))))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel40)
                .addGap(67, 67, 67))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jProgressBar4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jProgressBar2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jSlider2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(jLabel39, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addComponent(jLabel40)
                .addGap(18, 18, 18))
        );

        jCheckBox1.setText("Use local settings");
        jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(55, 55, 55)
                        .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jCheckBox1)
                        .addGap(48, 48, 48)
                        .addComponent(jCheckBox2)))
                .addContainerGap(89, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCheckBox2)
                    .addComponent(jCheckBox1))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.setBorder(javax.swing.BorderFactory.createTitledBorder("Functions"));
        jTabbedPane1.setEnabled(false);

        jTextField1.setText("jTextField1");
        jTextField1.setEnabled(false);
        jTextField1.setMinimumSize(new java.awt.Dimension(59, 20));

        jTextField2.setText("jTextField2");
        jTextField2.setEnabled(false);

        jTextField3.setText("jTextField3");
        jTextField3.setEnabled(false);

        jTextField4.setText("jTextField4");
        jTextField4.setEnabled(false);

        buttonGroup1.add(jRadioButton1);
        jRadioButton1.setText("S-shaped function");
        jRadioButton1.setEnabled(false);
        jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton1ActionPerformed(evt);
            }
        });

        buttonGroup1.add(jRadioButton2);
        jRadioButton2.setText("Triangle function");
        jRadioButton2.setEnabled(false);
        jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton2ActionPerformed(evt);
            }
        });

        buttonGroup1.add(jRadioButton3);
        jRadioButton3.setText("Trapezoid function");
        jRadioButton3.setEnabled(false);
        jRadioButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton3ActionPerformed(evt);
            }
        });

        buttonGroup1.add(jRadioButton4);
        jRadioButton4.setSelected(true);
        jRadioButton4.setText("Z-shaped function");
        jRadioButton4.setEnabled(false);
        jRadioButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton4ActionPerformed(evt);
            }
        });

        buttonGroup1.add(jRadioButton5);
        jRadioButton5.setText("Gaussian function");
        jRadioButton5.setEnabled(false);
        jRadioButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton5ActionPerformed(evt);
            }
        });

        jButton1.setText("SET");
        jButton1.setEnabled(false);
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jTextField5.setText("jTextField5");
        jTextField5.setEnabled(false);

        jTextField6.setText("jTextField6");
        jTextField6.setEnabled(false);

        jTextField7.setText("jTextField7");
        jTextField7.setEnabled(false);

        jLabel1.setText("Point1");
        jLabel1.setEnabled(false);

        jLabel2.setText("Point2");
        jLabel2.setEnabled(false);

        jLabel3.setText("Point3");
        jLabel3.setEnabled(false);

        jLabel4.setText("Point4");
        jLabel4.setEnabled(false);

        jLabel5.setText("Point5");
        jLabel5.setEnabled(false);

        jLabel6.setText("Point6");
        jLabel6.setEnabled(false);

        jLabel7.setText("Point7");
        jLabel7.setEnabled(false);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButton1)
                            .addComponent(jRadioButton4)
                            .addComponent(jRadioButton5))
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGap(100, 100, 100)
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addGap(0, 145, Short.MAX_VALUE)
                                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel5)
                                            .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel1))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 86, Short.MAX_VALUE)
                                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jLabel6)
                                            .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addGap(55, 55, 55)
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel7)
                                    .addComponent(jLabel4))
                                .addContainerGap())
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 155, Short.MAX_VALUE)
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel3)
                                    .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(99, 99, 99)
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel2))
                                .addGap(56, 56, 56))))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButton3)
                            .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 426, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                        .addComponent(jRadioButton2)
                        .addContainerGap(436, Short.MAX_VALUE))))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jRadioButton1)
                        .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel5)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton2)
                    .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton3)
                    .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton4)
                    .addComponent(jLabel1)
                    .addComponent(jLabel4)
                    .addComponent(jLabel6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton5)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                .addComponent(jButton1)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Cold", jPanel3);

        jTextField8.setText("jTextField1");
        jTextField8.setEnabled(false);

        jButton2.setText("SET");
        jButton2.setEnabled(false);
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        buttonGroup2.add(jRadioButton6);
        jRadioButton6.setText("Gaussian function");
        jRadioButton6.setEnabled(false);
        jRadioButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton6ActionPerformed(evt);
            }
        });

        buttonGroup2.add(jRadioButton7);
        jRadioButton7.setText("Z-shaped function");
        jRadioButton7.setEnabled(false);
        jRadioButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton7ActionPerformed(evt);
            }
        });

        buttonGroup2.add(jRadioButton8);
        jRadioButton8.setSelected(true);
        jRadioButton8.setText("Trapezoid function");
        jRadioButton8.setEnabled(false);
        jRadioButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton8ActionPerformed(evt);
            }
        });

        buttonGroup2.add(jRadioButton9);
        jRadioButton9.setText("Triangle function");
        jRadioButton9.setEnabled(false);
        jRadioButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton9ActionPerformed(evt);
            }
        });

        jLabel8.setText("Point1");
        jLabel8.setEnabled(false);

        jTextField9.setText("jTextField3");
        jTextField9.setEnabled(false);

        jLabel9.setText("Point3");
        jLabel9.setEnabled(false);

        jLabel10.setText("Point5");
        jLabel10.setEnabled(false);

        jTextField10.setText("jTextField5");
        jTextField10.setEnabled(false);

        jLabel11.setText("Point6");
        jLabel11.setEnabled(false);

        jTextField11.setText("jTextField6");
        jTextField11.setEnabled(false);

        jLabel12.setText("Point2");
        jLabel12.setEnabled(false);

        jTextField12.setText("jTextField2");
        jTextField12.setEnabled(false);

        jLabel13.setText("Point7");
        jLabel13.setEnabled(false);

        jTextField13.setText("jTextField7");
        jTextField13.setEnabled(false);

        jLabel14.setText("Point4");
        jLabel14.setEnabled(false);

        jTextField14.setText("jTextField4");
        jTextField14.setEnabled(false);

        buttonGroup2.add(jRadioButton10);
        jRadioButton10.setText("S-shaped function");
        jRadioButton10.setEnabled(false);
        jRadioButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton10ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButton10)
                            .addComponent(jRadioButton7)
                            .addComponent(jRadioButton6))
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addGap(100, 100, 100)
                                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(jPanel4Layout.createSequentialGroup()
                                        .addGap(0, 145, Short.MAX_VALUE)
                                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel10)
                                            .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(jPanel4Layout.createSequentialGroup()
                                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel8))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 86, Short.MAX_VALUE)
                                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jLabel11)
                                            .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addGap(55, 55, 55)
                                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel13)
                                    .addComponent(jLabel14))
                                .addContainerGap())
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 155, Short.MAX_VALUE)
                                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel9)
                                    .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(99, 99, 99)
                                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel12))
                                .addGap(56, 56, 56))))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButton8)
                            .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 426, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                        .addComponent(jRadioButton9)
                        .addContainerGap(436, Short.MAX_VALUE))))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(jLabel9))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jRadioButton10)
                        .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel10)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton9)
                    .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel13))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton8)
                    .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton7)
                    .addComponent(jLabel8)
                    .addComponent(jLabel14)
                    .addComponent(jLabel11))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton6)
                    .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                .addComponent(jButton2)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Calm", jPanel4);

        jTextField15.setText("jTextField1");
        jTextField15.setEnabled(false);

        jButton3.setText("SET");
        jButton3.setEnabled(false);
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        buttonGroup3.add(jRadioButton11);
        jRadioButton11.setText("Gaussian function");
        jRadioButton11.setEnabled(false);
        jRadioButton11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton11ActionPerformed(evt);
            }
        });

        buttonGroup3.add(jRadioButton12);
        jRadioButton12.setText("Z-shaped function");
        jRadioButton12.setEnabled(false);
        jRadioButton12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton12ActionPerformed(evt);
            }
        });

        buttonGroup3.add(jRadioButton13);
        jRadioButton13.setText("Trapezoid function");
        jRadioButton13.setEnabled(false);
        jRadioButton13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton13ActionPerformed(evt);
            }
        });

        buttonGroup3.add(jRadioButton14);
        jRadioButton14.setSelected(true);
        jRadioButton14.setText("Triangle function");
        jRadioButton14.setEnabled(false);
        jRadioButton14.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton14ActionPerformed(evt);
            }
        });

        jLabel15.setText("Point1");
        jLabel15.setEnabled(false);

        jTextField16.setText("jTextField3");
        jTextField16.setEnabled(false);

        jLabel16.setText("Point3");
        jLabel16.setEnabled(false);

        jLabel17.setText("Point5");
        jLabel17.setEnabled(false);

        jTextField17.setText("jTextField5");
        jTextField17.setEnabled(false);

        jLabel18.setText("Point6");
        jLabel18.setEnabled(false);

        jTextField18.setText("jTextField6");
        jTextField18.setEnabled(false);

        jLabel19.setText("Point2");
        jLabel19.setEnabled(false);

        jTextField19.setText("jTextField2");
        jTextField19.setEnabled(false);

        jLabel20.setText("Point7");
        jLabel20.setEnabled(false);

        jTextField20.setText("jTextField7");
        jTextField20.setEnabled(false);

        jLabel21.setText("Point4");
        jLabel21.setEnabled(false);

        jTextField21.setText("jTextField4");
        jTextField21.setEnabled(false);

        buttonGroup3.add(jRadioButton15);
        jRadioButton15.setText("S-shaped function");
        jRadioButton15.setEnabled(false);
        jRadioButton15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton15ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButton15)
                            .addComponent(jRadioButton12)
                            .addComponent(jRadioButton11))
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addGap(100, 100, 100)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(jPanel5Layout.createSequentialGroup()
                                        .addGap(0, 145, Short.MAX_VALUE)
                                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel17)
                                            .addComponent(jTextField17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(jPanel5Layout.createSequentialGroup()
                                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jTextField15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel15))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 86, Short.MAX_VALUE)
                                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jLabel18)
                                            .addComponent(jTextField18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addGap(55, 55, 55)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jTextField21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jTextField20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel20)
                                    .addComponent(jLabel21))
                                .addContainerGap())
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 155, Short.MAX_VALUE)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel16)
                                    .addComponent(jTextField16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(99, 99, 99)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jTextField19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel19))
                                .addGap(56, 56, 56))))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButton13)
                            .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 426, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                        .addComponent(jRadioButton14)
                        .addContainerGap(436, Short.MAX_VALUE))))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(jLabel16))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jRadioButton15)
                        .addComponent(jTextField16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTextField19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel17)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton14)
                    .addComponent(jTextField17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel20))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton13)
                    .addComponent(jTextField20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton12)
                    .addComponent(jLabel15)
                    .addComponent(jLabel21)
                    .addComponent(jLabel18))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton11)
                    .addComponent(jTextField15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                .addComponent(jButton3)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Perfect", jPanel5);

        jTextField22.setText("jTextField1");
        jTextField22.setEnabled(false);

        jButton4.setText("SET");
        jButton4.setEnabled(false);
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        buttonGroup4.add(jRadioButton16);
        jRadioButton16.setText("Gaussian function");
        jRadioButton16.setEnabled(false);
        jRadioButton16.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton16ActionPerformed(evt);
            }
        });

        buttonGroup4.add(jRadioButton17);
        jRadioButton17.setText("Z-shaped function");
        jRadioButton17.setEnabled(false);
        jRadioButton17.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton17ActionPerformed(evt);
            }
        });

        buttonGroup4.add(jRadioButton18);
        jRadioButton18.setSelected(true);
        jRadioButton18.setText("Trapezoid function");
        jRadioButton18.setEnabled(false);
        jRadioButton18.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton18ActionPerformed(evt);
            }
        });

        buttonGroup4.add(jRadioButton19);
        jRadioButton19.setText("Triangle function");
        jRadioButton19.setEnabled(false);
        jRadioButton19.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton19ActionPerformed(evt);
            }
        });

        jLabel22.setText("Point1");
        jLabel22.setEnabled(false);

        jTextField23.setText("jTextField3");
        jTextField23.setEnabled(false);

        jLabel23.setText("Point3");
        jLabel23.setEnabled(false);

        jLabel24.setText("Point5");
        jLabel24.setEnabled(false);

        jTextField24.setText("jTextField5");
        jTextField24.setEnabled(false);

        jLabel25.setText("Point6");
        jLabel25.setEnabled(false);

        jTextField25.setText("jTextField6");
        jTextField25.setEnabled(false);

        jLabel26.setText("Point2");
        jLabel26.setEnabled(false);

        jTextField26.setText("jTextField2");
        jTextField26.setEnabled(false);

        jLabel27.setText("Point7");
        jLabel27.setEnabled(false);

        jTextField27.setText("jTextField7");
        jTextField27.setEnabled(false);

        jLabel28.setText("Point4");
        jLabel28.setEnabled(false);

        jTextField28.setText("jTextField4");
        jTextField28.setEnabled(false);

        buttonGroup4.add(jRadioButton20);
        jRadioButton20.setText("S-shaped function");
        jRadioButton20.setEnabled(false);
        jRadioButton20.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton20ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButton20)
                            .addComponent(jRadioButton17)
                            .addComponent(jRadioButton16))
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel6Layout.createSequentialGroup()
                                .addGap(100, 100, 100)
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(jPanel6Layout.createSequentialGroup()
                                        .addGap(0, 145, Short.MAX_VALUE)
                                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel24)
                                            .addComponent(jTextField24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(jPanel6Layout.createSequentialGroup()
                                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jTextField22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel22))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 86, Short.MAX_VALUE)
                                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jLabel25)
                                            .addComponent(jTextField25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addGap(55, 55, 55)
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jTextField28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jTextField27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel27)
                                    .addComponent(jLabel28))
                                .addContainerGap())
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 155, Short.MAX_VALUE)
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel23)
                                    .addComponent(jTextField23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(99, 99, 99)
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jTextField26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel26))
                                .addGap(56, 56, 56))))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButton18)
                            .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 426, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                        .addComponent(jRadioButton19)
                        .addContainerGap(436, Short.MAX_VALUE))))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(jLabel23))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jRadioButton20)
                        .addComponent(jTextField23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTextField26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel24)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton19)
                    .addComponent(jTextField24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel27))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton18)
                    .addComponent(jTextField27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton17)
                    .addComponent(jLabel22)
                    .addComponent(jLabel28)
                    .addComponent(jLabel25))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton16)
                    .addComponent(jTextField22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                .addComponent(jButton4)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Warm", jPanel6);

        jTextField29.setText("jTextField1");
        jTextField29.setEnabled(false);

        jButton5.setText("SET");
        jButton5.setEnabled(false);
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        buttonGroup5.add(jRadioButton21);
        jRadioButton21.setText("Gaussian function");
        jRadioButton21.setEnabled(false);
        jRadioButton21.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton21ActionPerformed(evt);
            }
        });

        buttonGroup5.add(jRadioButton22);
        jRadioButton22.setText("Z-shaped function");
        jRadioButton22.setEnabled(false);
        jRadioButton22.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton22ActionPerformed(evt);
            }
        });

        buttonGroup5.add(jRadioButton23);
        jRadioButton23.setText("Trapezoid function");
        jRadioButton23.setEnabled(false);
        jRadioButton23.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton23ActionPerformed(evt);
            }
        });

        buttonGroup5.add(jRadioButton24);
        jRadioButton24.setText("Triangle function");
        jRadioButton24.setEnabled(false);
        jRadioButton24.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton24ActionPerformed(evt);
            }
        });

        jLabel29.setText("Point1");
        jLabel29.setEnabled(false);

        jTextField30.setText("jTextField3");
        jTextField30.setEnabled(false);

        jLabel30.setText("Point3");
        jLabel30.setEnabled(false);

        jLabel31.setText("Point5");
        jLabel31.setEnabled(false);

        jTextField31.setText("jTextField5");
        jTextField31.setEnabled(false);

        jLabel32.setText("Point6");
        jLabel32.setEnabled(false);

        jTextField32.setText("jTextField6");
        jTextField32.setEnabled(false);

        jLabel33.setText("Point2");
        jLabel33.setEnabled(false);

        jTextField33.setText("jTextField2");
        jTextField33.setEnabled(false);

        jLabel34.setText("Point7");
        jLabel34.setEnabled(false);

        jTextField34.setText("jTextField7");
        jTextField34.setEnabled(false);

        jLabel35.setText("Point4");
        jLabel35.setEnabled(false);

        jTextField35.setText("jTextField4");
        jTextField35.setEnabled(false);

        buttonGroup5.add(jRadioButton25);
        jRadioButton25.setSelected(true);
        jRadioButton25.setText("S-shaped function");
        jRadioButton25.setEnabled(false);
        jRadioButton25.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton25ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButton25)
                            .addComponent(jRadioButton22)
                            .addComponent(jRadioButton21))
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel7Layout.createSequentialGroup()
                                .addGap(100, 100, 100)
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(jPanel7Layout.createSequentialGroup()
                                        .addGap(0, 145, Short.MAX_VALUE)
                                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel31)
                                            .addComponent(jTextField31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(jPanel7Layout.createSequentialGroup()
                                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jTextField29, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel29))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 86, Short.MAX_VALUE)
                                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jLabel32)
                                            .addComponent(jTextField32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addGap(55, 55, 55)
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jTextField35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jTextField34, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel34)
                                    .addComponent(jLabel35))
                                .addContainerGap())
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 155, Short.MAX_VALUE)
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel30)
                                    .addComponent(jTextField30, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(99, 99, 99)
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jTextField33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel33))
                                .addGap(56, 56, 56))))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButton23)
                            .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 426, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                        .addComponent(jRadioButton24)
                        .addContainerGap(436, Short.MAX_VALUE))))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel33)
                    .addComponent(jLabel30))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jRadioButton25)
                        .addComponent(jTextField30, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTextField33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel31)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton24)
                    .addComponent(jTextField31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel34))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton23)
                    .addComponent(jTextField34, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton22)
                    .addComponent(jLabel29)
                    .addComponent(jLabel35)
                    .addComponent(jLabel32))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jRadioButton21)
                    .addComponent(jTextField29, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                .addComponent(jButton5)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Hot", jPanel7);

        jMenu4.setText("File");

        jMenuItem1.setText("jMenuItem1");
        jMenu4.add(jMenuItem1);

        jMenuItem2.setText("Exit");
        jMenu4.add(jMenuItem2);

        jMenuBar2.add(jMenu4);

        jMenu5.setText("Edit");
        jMenuBar2.add(jMenu5);

        setJMenuBar(jMenuBar2);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 568, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jScrollPane1))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
        jLabel1.setEnabled(false);
        jTextField1.setEnabled(false);
        jLabel2.setEnabled(false);
        jTextField2.setEnabled(false);
        jLabel3.setEnabled(true);
        jTextField3.setEnabled(true);
        jLabel4.setEnabled(true);
        jTextField4.setEnabled(true);
        jLabel5.setEnabled(false);
        jTextField5.setEnabled(false);
        jLabel6.setEnabled(false);
        jTextField6.setEnabled(false);
        jLabel7.setEnabled(false);
        jTextField7.setEnabled(false);
    }//GEN-LAST:event_jRadioButton1ActionPerformed

    private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
        jLabel1.setEnabled(true);
        jTextField1.setEnabled(true);
        jLabel2.setEnabled(false);
        jTextField2.setEnabled(false);
        jLabel3.setEnabled(false);
        jTextField3.setEnabled(false);
        jLabel4.setEnabled(true);
        jTextField4.setEnabled(true);
        jLabel5.setEnabled(true);
        jTextField5.setEnabled(true);
        jLabel6.setEnabled(false);
        jTextField6.setEnabled(false);
        jLabel7.setEnabled(false);
        jTextField7.setEnabled(false);
    }//GEN-LAST:event_jRadioButton2ActionPerformed

    private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton3ActionPerformed
        jLabel1.setEnabled(true);
        jTextField1.setEnabled(true);
        jLabel2.setEnabled(true);
        jTextField2.setEnabled(true);
        jLabel3.setEnabled(true);
        jTextField3.setEnabled(true);
        jLabel4.setEnabled(true);
        jTextField4.setEnabled(true);
        jLabel5.setEnabled(false);
        jTextField5.setEnabled(false);
        jLabel6.setEnabled(false);
        jTextField6.setEnabled(false);
        jLabel7.setEnabled(false);
        jTextField7.setEnabled(false);
    }//GEN-LAST:event_jRadioButton3ActionPerformed

    private void jRadioButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton4ActionPerformed
        jLabel1.setEnabled(true);
        jTextField1.setEnabled(true);
        jLabel2.setEnabled(true);
        jTextField2.setEnabled(true);
        jLabel3.setEnabled(false);
        jTextField3.setEnabled(false);
        jLabel4.setEnabled(false);
        jTextField4.setEnabled(false);
        jLabel5.setEnabled(false);
        jTextField5.setEnabled(false);
        jLabel6.setEnabled(false);
        jTextField6.setEnabled(false);
        jLabel7.setEnabled(false);
        jTextField7.setEnabled(false);
    }//GEN-LAST:event_jRadioButton4ActionPerformed

    private void jRadioButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton5ActionPerformed
        jLabel1.setEnabled(false);
        jTextField1.setEnabled(false);
        jLabel2.setEnabled(false);
        jTextField2.setEnabled(false);
        jLabel3.setEnabled(false);
        jTextField3.setEnabled(false);
        jLabel4.setEnabled(false);
        jTextField4.setEnabled(false);
        jLabel5.setEnabled(false);
        jTextField5.setEnabled(false);
        jLabel6.setEnabled(true);
        jTextField6.setEnabled(true);
        jLabel7.setEnabled(true);
        jTextField7.setEnabled(true);
    }//GEN-LAST:event_jRadioButton5ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        float p1=0, p2=0, p3=0, p4=0, p5=0, p6=0, p7=0;
        if (jTextField1.isEnabled()) {
            p1 = Float.parseFloat(jTextField1.getText());
        }
        if (jTextField2.isEnabled()) {
            p2 = Float.parseFloat(jTextField2.getText());
        }
        if (jTextField3.isEnabled()) {
            p3 = Float.parseFloat(jTextField3.getText());
        }
        if (jTextField4.isEnabled()) {
            p4 = Float.parseFloat(jTextField4.getText());
        }
        if (jTextField5.isEnabled()) {
            p5 = Float.parseFloat(jTextField5.getText());
        }
        if (jTextField6.isEnabled()) {
            p6 = Float.parseFloat(jTextField6.getText());
        }
        if (jTextField7.isEnabled()) {
            p7 = Float.parseFloat(jTextField7.getText());
        }

        if (buttonGroup1.getSelection() == jRadioButton1) {
            cold_fun = 0;
            cold = new float[2];
            cold[0] = p3;
            cold[1] = p4;
        } else if (buttonGroup1.getSelection() == jRadioButton2) {
            cold_fun = 1;
            cold = new float[3];
            cold[0] = p1;
            cold[1] = p5;
            cold[2] = p4;
        } else if (buttonGroup1.getSelection() == jRadioButton3) {
            cold_fun = 2;
            cold = new float[4];
            cold[0] = p1;
            cold[1] = p3;
            cold[2] = p2;
            cold[3] = p4;
        } else if (buttonGroup1.getSelection() == jRadioButton4) {
            cold_fun = 3;
            cold = new float[2];
            cold[0] = p1;
            cold[1] = p2;
        } else if (buttonGroup1.getSelection() == jRadioButton5) {
            cold_fun = 4;
            cold = new float[2];
            cold[0] = p6;
            cold[1] = p7;
        }
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        float p1=0, p2=0, p3=0, p4=0, p5=0, p6=0, p7=0;
        if (jTextField8.isEnabled()) {
            p1 = Float.parseFloat(jTextField8.getText());
        }
        if (jTextField12.isEnabled()) {
            p2 = Float.parseFloat(jTextField12.getText());
        }
        if (jTextField9.isEnabled()) {
            p3 = Float.parseFloat(jTextField9.getText());
        }
        if (jTextField14.isEnabled()) {
            p4 = Float.parseFloat(jTextField14.getText());
        }
        if (jTextField10.isEnabled()) {
            p5 = Float.parseFloat(jTextField10.getText());
        }
        if (jTextField11.isEnabled()) {
            p6 = Float.parseFloat(jTextField11.getText());
        }
        if (jTextField13.isEnabled()) {
            p7 = Float.parseFloat(jTextField13.getText());
        }

        if (buttonGroup2.getSelection() == jRadioButton10) {
            calm_fun = 0;
            calm = new float[2];
            calm[0] = p3;
            calm[1] = p4;
        } else if (buttonGroup2.getSelection() == jRadioButton9) {
            calm_fun = 1;
            calm = new float[3];
            calm[0] = p1;
            calm[1] = p5;
            calm[2] = p4;
        } else if (buttonGroup2.getSelection() == jRadioButton8) {
            calm_fun = 2;
            calm = new float[4];
            calm[0] = p1;
            calm[1] = p3;
            calm[2] = p2;
            calm[3] = p4;
        } else if (buttonGroup2.getSelection() == jRadioButton7) {
            calm_fun = 3;
            calm = new float[2];
            calm[0] = p1;
            calm[1] = p2;
        } else if (buttonGroup2.getSelection() == jRadioButton6) {
            calm_fun = 4;
            calm = new float[2];
            calm[0] = p6;
            calm[1] = p7;
        }
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jRadioButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton6ActionPerformed
        jLabel8.setEnabled(false);
        jTextField8.setEnabled(false);
        jLabel12.setEnabled(false);
        jTextField12.setEnabled(false);
        jLabel9.setEnabled(false);
        jTextField9.setEnabled(false);
        jLabel14.setEnabled(false);
        jTextField14.setEnabled(false);
        jLabel10.setEnabled(false);
        jTextField10.setEnabled(false);
        jLabel11.setEnabled(true);
        jTextField11.setEnabled(true);
        jLabel13.setEnabled(true);
        jTextField13.setEnabled(true);
    }//GEN-LAST:event_jRadioButton6ActionPerformed

    private void jRadioButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton7ActionPerformed
        jLabel8.setEnabled(true);
        jTextField8.setEnabled(true);
        jLabel12.setEnabled(true);
        jTextField12.setEnabled(true);
        jLabel9.setEnabled(false);
        jTextField9.setEnabled(false);
        jLabel14.setEnabled(false);
        jTextField14.setEnabled(false);
        jLabel10.setEnabled(false);
        jTextField10.setEnabled(false);
        jLabel11.setEnabled(false);
        jTextField11.setEnabled(false);
        jLabel13.setEnabled(false);
        jTextField13.setEnabled(false);
    }//GEN-LAST:event_jRadioButton7ActionPerformed

    private void jRadioButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton8ActionPerformed
        jLabel8.setEnabled(true);
        jTextField8.setEnabled(true);
        jLabel12.setEnabled(true);
        jTextField12.setEnabled(true);
        jLabel9.setEnabled(true);
        jTextField9.setEnabled(true);
        jLabel14.setEnabled(true);
        jTextField14.setEnabled(true);
        jLabel10.setEnabled(false);
        jTextField10.setEnabled(false);
        jLabel11.setEnabled(false);
        jTextField11.setEnabled(false);
        jLabel13.setEnabled(false);
        jTextField13.setEnabled(false);
    }//GEN-LAST:event_jRadioButton8ActionPerformed

    private void jRadioButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton9ActionPerformed
        jLabel8.setEnabled(true);
        jTextField8.setEnabled(true);
        jLabel12.setEnabled(false);
        jTextField12.setEnabled(false);
        jLabel9.setEnabled(false);
        jTextField9.setEnabled(false);
        jLabel14.setEnabled(true);
        jTextField14.setEnabled(true);
        jLabel10.setEnabled(true);
        jTextField10.setEnabled(true);
        jLabel11.setEnabled(false);
        jTextField11.setEnabled(false);
        jLabel13.setEnabled(false);
        jTextField13.setEnabled(false);
    }//GEN-LAST:event_jRadioButton9ActionPerformed

    private void jRadioButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton10ActionPerformed
        jLabel8.setEnabled(false);
        jTextField8.setEnabled(false);
        jLabel12.setEnabled(false);
        jTextField12.setEnabled(false);
        jLabel9.setEnabled(true);
        jTextField9.setEnabled(true);
        jLabel14.setEnabled(true);
        jTextField14.setEnabled(true);
        jLabel10.setEnabled(false);
        jTextField10.setEnabled(false);
        jLabel11.setEnabled(false);
        jTextField11.setEnabled(false);
        jLabel13.setEnabled(false);
        jTextField13.setEnabled(false);
    }//GEN-LAST:event_jRadioButton10ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        float p1=0, p2=0, p3=0, p4=0, p5=0, p6=0, p7=0;
        if (jTextField15.isEnabled()) {
            p1 = Float.parseFloat(jTextField15.getText());
        }
        if (jTextField19.isEnabled()) {
            p2 = Float.parseFloat(jTextField19.getText());
        }
        if (jTextField16.isEnabled()) {
            p3 = Float.parseFloat(jTextField16.getText());
        }
        if (jTextField21.isEnabled()) {
            p4 = Float.parseFloat(jTextField21.getText());
        }
        if (jTextField17.isEnabled()) {
            p5 = Float.parseFloat(jTextField17.getText());
        }
        if (jTextField18.isEnabled()) {
            p6 = Float.parseFloat(jTextField18.getText());
        }
        if (jTextField20.isEnabled()) {
            p7 = Float.parseFloat(jTextField20.getText());
        }
        this.p = new Regula[1];
        if (buttonGroup3.getSelection() == jRadioButton15) {
            perfect_fun = 0;
            perfect = new float[2];
            perfect[0] = p3;
            perfect[1] = p4;
            p[0] = new Regula(0, 0, (p4 + p3) / 2, 0);
        } else if (buttonGroup3.getSelection() == jRadioButton14) {
            perfect_fun = 1;
            perfect = new float[3];
            perfect[0] = p1;
            perfect[1] = p5;
            perfect[2] = p4;
            p[0] = new Regula(0, 0, p5, 0);
        } else if (buttonGroup3.getSelection() == jRadioButton13) {
            perfect_fun = 2;
            perfect = new float[4];
            perfect[0] = p1;
            perfect[1] = p3;
            perfect[2] = p2;
            perfect[3] = p4;
            p[0] = new Regula(0, 0, (p2 + p3) / 2, 0);
        } else if (buttonGroup3.getSelection() == jRadioButton12) {
            perfect_fun = 3;
            perfect = new float[2];
            perfect[0] = p1;
            perfect[1] = p2;
            p[0] = new Regula(0, 0, (p2 + p1) / 2, 0);
        } else if (buttonGroup3.getSelection() == jRadioButton11) {
            perfect_fun = 4;
            perfect = new float[2];
            perfect[0] = p6;
            perfect[1] = p7;
            p[0] = new Regula(0, 0, p6, 0);
        }


    }//GEN-LAST:event_jButton3ActionPerformed

    private void jRadioButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton11ActionPerformed
        jLabel15.setEnabled(false);
        jTextField15.setEnabled(false);
        jLabel19.setEnabled(false);
        jTextField19.setEnabled(false);
        jLabel16.setEnabled(false);
        jTextField16.setEnabled(false);
        jLabel21.setEnabled(false);
        jTextField21.setEnabled(false);
        jLabel17.setEnabled(false);
        jTextField17.setEnabled(false);
        jLabel18.setEnabled(true);
        jTextField18.setEnabled(true);
        jLabel20.setEnabled(true);
        jTextField20.setEnabled(true);
    }//GEN-LAST:event_jRadioButton11ActionPerformed

    private void jRadioButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton12ActionPerformed
        jLabel15.setEnabled(true);
        jTextField15.setEnabled(true);
        jLabel19.setEnabled(true);
        jTextField19.setEnabled(true);
        jLabel16.setEnabled(false);
        jTextField16.setEnabled(false);
        jLabel21.setEnabled(false);
        jTextField21.setEnabled(false);
        jLabel17.setEnabled(false);
        jTextField17.setEnabled(false);
        jLabel18.setEnabled(false);
        jTextField18.setEnabled(false);
        jLabel20.setEnabled(false);
        jTextField20.setEnabled(false);
    }//GEN-LAST:event_jRadioButton12ActionPerformed

    private void jRadioButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton13ActionPerformed
        jLabel15.setEnabled(true);
        jTextField15.setEnabled(true);
        jLabel19.setEnabled(true);
        jTextField19.setEnabled(true);
        jLabel16.setEnabled(true);
        jTextField16.setEnabled(true);
        jLabel21.setEnabled(true);
        jTextField21.setEnabled(true);
        jLabel17.setEnabled(false);
        jTextField17.setEnabled(false);
        jLabel18.setEnabled(false);
        jTextField18.setEnabled(false);
        jLabel20.setEnabled(false);
        jTextField20.setEnabled(false);
    }//GEN-LAST:event_jRadioButton13ActionPerformed

    private void jRadioButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton14ActionPerformed
        jLabel15.setEnabled(true);
        jTextField15.setEnabled(true);
        jLabel19.setEnabled(false);
        jTextField19.setEnabled(false);
        jLabel16.setEnabled(false);
        jTextField16.setEnabled(false);
        jLabel21.setEnabled(true);
        jTextField21.setEnabled(true);
        jLabel17.setEnabled(true);
        jTextField17.setEnabled(true);
        jLabel18.setEnabled(false);
        jTextField18.setEnabled(false);
        jLabel20.setEnabled(false);
        jTextField20.setEnabled(false);
    }//GEN-LAST:event_jRadioButton14ActionPerformed

    private void jRadioButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton15ActionPerformed
        jLabel15.setEnabled(false);
        jTextField15.setEnabled(false);
        jLabel19.setEnabled(false);
        jTextField19.setEnabled(false);
        jLabel16.setEnabled(true);
        jTextField16.setEnabled(true);
        jLabel21.setEnabled(true);
        jTextField21.setEnabled(true);
        jLabel17.setEnabled(false);
        jTextField17.setEnabled(false);
        jLabel18.setEnabled(false);
        jTextField18.setEnabled(false);
        jLabel20.setEnabled(false);
        jTextField20.setEnabled(false);
    }//GEN-LAST:event_jRadioButton15ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        float p1=0, p2=0, p3=0, p4=0, p5=0, p6=0, p7=0;
        if (jTextField22.isEnabled()) {
            p1 = Float.parseFloat(jTextField22.getText());
        }
        if (jTextField26.isEnabled()) {
            p2 = Float.parseFloat(jTextField26.getText());
        }
        if (jTextField23.isEnabled()) {
            p3 = Float.parseFloat(jTextField23.getText());
        }
        if (jTextField28.isEnabled()) {
            p4 = Float.parseFloat(jTextField28.getText());
        }
        if (jTextField24.isEnabled()) {
            p5 = Float.parseFloat(jTextField24.getText());
        }
        if (jTextField25.isEnabled()) {
            p6 = Float.parseFloat(jTextField25.getText());
        }
        if (jTextField27.isEnabled()) {
            p7 = Float.parseFloat(jTextField27.getText());
        }

        if (buttonGroup4.getSelection() == jRadioButton20) {
            warm_fun = 0;
            warm = new float[2];
            warm[0] = p3;
            warm[1] = p4;
        } else if (buttonGroup4.getSelection() == jRadioButton19) {
            warm_fun = 1;
            warm = new float[3];
            warm[0] = p1;
            warm[1] = p5;
            warm[2] = p4;
        } else if (buttonGroup4.getSelection() == jRadioButton18) {
            warm_fun = 2;
            warm = new float[4];
            warm[0] = p1;
            warm[1] = p3;
            warm[2] = p2;
            warm[3] = p4;
        } else if (buttonGroup4.getSelection() == jRadioButton17) {
            warm_fun = 3;
            warm = new float[2];
            warm[0] = p1;
            warm[1] = p2;
        } else if (buttonGroup4.getSelection() == jRadioButton16) {
            warm_fun = 4;
            warm = new float[2];
            warm[0] = p6;
            warm[1] = p7;
        }
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jRadioButton16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton16ActionPerformed
        jLabel22.setEnabled(false);
        jTextField22.setEnabled(false);
        jLabel26.setEnabled(false);
        jTextField26.setEnabled(false);
        jLabel23.setEnabled(false);
        jTextField23.setEnabled(false);
        jLabel28.setEnabled(false);
        jTextField28.setEnabled(false);
        jLabel24.setEnabled(false);
        jTextField24.setEnabled(false);
        jLabel25.setEnabled(true);
        jTextField25.setEnabled(true);
        jLabel27.setEnabled(true);
        jTextField27.setEnabled(true);
    }//GEN-LAST:event_jRadioButton16ActionPerformed

    private void jRadioButton17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton17ActionPerformed
        jLabel22.setEnabled(true);
        jTextField22.setEnabled(true);
        jLabel26.setEnabled(true);
        jTextField26.setEnabled(true);
        jLabel23.setEnabled(false);
        jTextField23.setEnabled(false);
        jLabel28.setEnabled(false);
        jTextField28.setEnabled(false);
        jLabel24.setEnabled(false);
        jTextField24.setEnabled(false);
        jLabel25.setEnabled(false);
        jTextField25.setEnabled(false);
        jLabel27.setEnabled(false);
        jTextField27.setEnabled(false);
    }//GEN-LAST:event_jRadioButton17ActionPerformed

    private void jRadioButton18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton18ActionPerformed
        jLabel22.setEnabled(true);
        jTextField22.setEnabled(true);
        jLabel26.setEnabled(true);
        jTextField26.setEnabled(true);
        jLabel23.setEnabled(true);
        jTextField23.setEnabled(true);
        jLabel28.setEnabled(true);
        jTextField28.setEnabled(true);
        jLabel24.setEnabled(false);
        jTextField24.setEnabled(false);
        jLabel25.setEnabled(false);
        jTextField25.setEnabled(false);
        jLabel27.setEnabled(false);
        jTextField27.setEnabled(false);
    }//GEN-LAST:event_jRadioButton18ActionPerformed

    private void jRadioButton19ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton19ActionPerformed
        jLabel22.setEnabled(true);
        jTextField22.setEnabled(true);
        jLabel26.setEnabled(false);
        jTextField26.setEnabled(false);
        jLabel23.setEnabled(false);
        jTextField23.setEnabled(false);
        jLabel28.setEnabled(true);
        jTextField28.setEnabled(true);
        jLabel24.setEnabled(true);
        jTextField24.setEnabled(true);
        jLabel25.setEnabled(false);
        jTextField25.setEnabled(false);
        jLabel27.setEnabled(false);
        jTextField27.setEnabled(false);
    }//GEN-LAST:event_jRadioButton19ActionPerformed

    private void jRadioButton20ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton20ActionPerformed
        jLabel22.setEnabled(false);
        jTextField22.setEnabled(false);
        jLabel26.setEnabled(false);
        jTextField26.setEnabled(false);
        jLabel23.setEnabled(true);
        jTextField23.setEnabled(true);
        jLabel28.setEnabled(true);
        jTextField28.setEnabled(true);
        jLabel24.setEnabled(false);
        jTextField24.setEnabled(false);
        jLabel25.setEnabled(false);
        jTextField25.setEnabled(false);
        jLabel27.setEnabled(false);
        jTextField27.setEnabled(false);
    }//GEN-LAST:event_jRadioButton20ActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        float p1=0, p2=0, p3=0, p4=0, p5=0, p6=0, p7=0;
        if (jTextField29.isEnabled()) {
            p1 = Float.parseFloat(jTextField29.getText());
        }
        if (jTextField33.isEnabled()) {
            p2 = Float.parseFloat(jTextField33.getText());
        }
        if (jTextField30.isEnabled()) {
            p3 = Float.parseFloat(jTextField30.getText());
        }
        if (jTextField35.isEnabled()) {
            p4 = Float.parseFloat(jTextField35.getText());
        }
        if (jTextField31.isEnabled()) {
            p5 = Float.parseFloat(jTextField31.getText());
        }
        if (jTextField32.isEnabled()) {
            p6 = Float.parseFloat(jTextField32.getText());
        }
        if (jTextField34.isEnabled()) {
            p7 = Float.parseFloat(jTextField34.getText());
        }

        if (buttonGroup5.getSelection() == jRadioButton25) {
            hot_fun = 0;
            hot = new float[2];
            hot[0] = p3;
            hot[1] = p4;
        } else if (buttonGroup5.getSelection() == jRadioButton19) {
            hot_fun = 1;
            hot = new float[3];
            hot[0] = p1;
            hot[1] = p5;
            hot[2] = p4;
        } else if (buttonGroup5.getSelection() == jRadioButton18) {
            hot_fun = 2;
            hot = new float[4];
            hot[0] = p1;
            hot[1] = p3;
            hot[2] = p2;
            hot[3] = p4;
        } else if (buttonGroup5.getSelection() == jRadioButton17) {
            hot_fun = 3;
            hot = new float[2];
            hot[0] = p1;
            hot[1] = p2;
        } else if (buttonGroup5.getSelection() == jRadioButton16) {
            hot_fun = 4;
            hot = new float[2];
            hot[0] = p6;
            hot[1] = p7;
        }
    }//GEN-LAST:event_jButton5ActionPerformed

    private void jRadioButton21ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton21ActionPerformed
        jLabel29.setEnabled(false);
        jTextField29.setEnabled(false);
        jLabel33.setEnabled(false);
        jTextField33.setEnabled(false);
        jLabel30.setEnabled(false);
        jTextField30.setEnabled(false);
        jLabel35.setEnabled(false);
        jTextField35.setEnabled(false);
        jLabel31.setEnabled(false);
        jTextField31.setEnabled(false);
        jLabel32.setEnabled(true);
        jTextField32.setEnabled(true);
        jLabel34.setEnabled(true);
        jTextField34.setEnabled(true);
    }//GEN-LAST:event_jRadioButton21ActionPerformed

    private void jRadioButton22ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton22ActionPerformed
        jLabel29.setEnabled(true);
        jTextField29.setEnabled(true);
        jLabel33.setEnabled(true);
        jTextField33.setEnabled(true);
        jLabel30.setEnabled(false);
        jTextField30.setEnabled(false);
        jLabel35.setEnabled(false);
        jTextField35.setEnabled(false);
        jLabel31.setEnabled(false);
        jTextField31.setEnabled(false);
        jLabel32.setEnabled(false);
        jTextField32.setEnabled(false);
        jLabel34.setEnabled(false);
        jTextField34.setEnabled(false);
    }//GEN-LAST:event_jRadioButton22ActionPerformed

    private void jRadioButton23ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton23ActionPerformed
        jLabel29.setEnabled(true);
        jTextField29.setEnabled(true);
        jLabel33.setEnabled(true);
        jTextField33.setEnabled(true);
        jLabel30.setEnabled(true);
        jTextField30.setEnabled(true);
        jLabel35.setEnabled(true);
        jTextField35.setEnabled(true);
        jLabel31.setEnabled(false);
        jTextField31.setEnabled(false);
        jLabel32.setEnabled(false);
        jTextField32.setEnabled(false);
        jLabel34.setEnabled(false);
        jTextField34.setEnabled(false);
    }//GEN-LAST:event_jRadioButton23ActionPerformed

    private void jRadioButton24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton24ActionPerformed
        jLabel29.setEnabled(true);
        jTextField29.setEnabled(true);
        jLabel33.setEnabled(false);
        jTextField33.setEnabled(false);
        jLabel30.setEnabled(false);
        jTextField30.setEnabled(false);
        jLabel35.setEnabled(true);
        jTextField35.setEnabled(true);
        jLabel31.setEnabled(true);
        jTextField31.setEnabled(true);
        jLabel32.setEnabled(false);
        jTextField32.setEnabled(false);
        jLabel34.setEnabled(false);
        jTextField34.setEnabled(false);
    }//GEN-LAST:event_jRadioButton24ActionPerformed

    private void jRadioButton25ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton25ActionPerformed
        jLabel29.setEnabled(false);
        jTextField29.setEnabled(false);
        jLabel33.setEnabled(false);
        jTextField33.setEnabled(false);
        jLabel30.setEnabled(true);
        jTextField30.setEnabled(true);
        jLabel35.setEnabled(true);
        jTextField35.setEnabled(true);
        jLabel31.setEnabled(false);
        jTextField31.setEnabled(false);
        jLabel32.setEnabled(false);
        jTextField32.setEnabled(false);
        jLabel34.setEnabled(false);
        jTextField34.setEnabled(false);
    }//GEN-LAST:event_jRadioButton25ActionPerformed

    private void jCheckBox2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox2ActionPerformed
        if (jCheckBox2.isSelected()) {
            jTabbedPane1.setEnabled(true);
            jButton1.setEnabled(true);
            jButton2.setEnabled(true);
            jButton3.setEnabled(true);
            jButton4.setEnabled(true);
            jButton5.setEnabled(true);
            jLabel1.setEnabled(true);
            jLabel2.setEnabled(true);
            jLabel3.setEnabled(true);
            jLabel4.setEnabled(true);
            jLabel5.setEnabled(true);
            jLabel6.setEnabled(true);
            jLabel7.setEnabled(true);
            jLabel8.setEnabled(true);
            jLabel9.setEnabled(true);
            jLabel10.setEnabled(true);
            jLabel11.setEnabled(true);
            jLabel12.setEnabled(true);
            jLabel13.setEnabled(true);
            jLabel14.setEnabled(true);
            jLabel15.setEnabled(true);
            jLabel16.setEnabled(true);
            jLabel17.setEnabled(true);
            jLabel18.setEnabled(true);
            jLabel19.setEnabled(true);
            jLabel20.setEnabled(true);
            jLabel21.setEnabled(true);
            jLabel22.setEnabled(true);
            jLabel23.setEnabled(true);
            jLabel24.setEnabled(true);
            jLabel25.setEnabled(true);
            jLabel26.setEnabled(true);
            jLabel27.setEnabled(true);
            jLabel28.setEnabled(true);
            jLabel29.setEnabled(true);
            jLabel30.setEnabled(true);
            jLabel31.setEnabled(true);
            jLabel32.setEnabled(true);
            jLabel33.setEnabled(true);
            jLabel34.setEnabled(true);
            jLabel35.setEnabled(true);
            jTextField1.setEnabled(true);
            jTextField2.setEnabled(true);
            jTextField3.setEnabled(true);
            jTextField4.setEnabled(true);
            jTextField5.setEnabled(true);
            jTextField6.setEnabled(true);
            jTextField7.setEnabled(true);
            jTextField8.setEnabled(true);
            jTextField9.setEnabled(true);
            jTextField10.setEnabled(true);
            jTextField11.setEnabled(true);
            jTextField12.setEnabled(true);
            jTextField13.setEnabled(true);
            jTextField14.setEnabled(true);
            jTextField15.setEnabled(true);
            jTextField16.setEnabled(true);
            jTextField17.setEnabled(true);
            jTextField18.setEnabled(true);
            jTextField19.setEnabled(true);
            jTextField20.setEnabled(true);
            jTextField21.setEnabled(true);
            jTextField22.setEnabled(true);
            jTextField23.setEnabled(true);
            jTextField24.setEnabled(true);
            jTextField25.setEnabled(true);
            jTextField26.setEnabled(true);
            jTextField27.setEnabled(true);
            jTextField28.setEnabled(true);
            jTextField29.setEnabled(true);
            jTextField30.setEnabled(true);
            jTextField31.setEnabled(true);
            jTextField32.setEnabled(true);
            jTextField33.setEnabled(true);
            jTextField34.setEnabled(true);
            jTextField35.setEnabled(true);
            jRadioButton1.setEnabled(true);
            jRadioButton2.setEnabled(true);
            jRadioButton3.setEnabled(true);
            jRadioButton4.setEnabled(true);
            jRadioButton5.setEnabled(true);
            jRadioButton6.setEnabled(true);
            jRadioButton7.setEnabled(true);
            jRadioButton8.setEnabled(true);
            jRadioButton9.setEnabled(true);
            jRadioButton10.setEnabled(true);
            jRadioButton11.setEnabled(true);
            jRadioButton12.setEnabled(true);
            jRadioButton13.setEnabled(true);
            jRadioButton14.setEnabled(true);
            jRadioButton15.setEnabled(true);
            jRadioButton16.setEnabled(true);
            jRadioButton17.setEnabled(true);
            jRadioButton18.setEnabled(true);
            jRadioButton19.setEnabled(true);
            jRadioButton20.setEnabled(true);
            jRadioButton21.setEnabled(true);
            jRadioButton22.setEnabled(true);
            jRadioButton23.setEnabled(true);
            jRadioButton24.setEnabled(true);
            jRadioButton25.setEnabled(true);
            advanced = true;
            jRadioButton4ActionPerformed(evt);
            jRadioButton8ActionPerformed(evt);
            jRadioButton14ActionPerformed(evt);
            jRadioButton18ActionPerformed(evt);
            jRadioButton25ActionPerformed(evt);
        } else {
            jTabbedPane1.setEnabled(false);
            jButton1.setEnabled(false);
            jButton2.setEnabled(false);
            jButton3.setEnabled(false);
            jButton4.setEnabled(false);
            jButton5.setEnabled(false);
            jLabel1.setEnabled(false);
            jLabel2.setEnabled(false);
            jLabel3.setEnabled(false);
            jLabel4.setEnabled(false);
            jLabel5.setEnabled(false);
            jLabel6.setEnabled(false);
            jLabel7.setEnabled(false);
            jLabel8.setEnabled(false);
            jLabel9.setEnabled(false);
            jLabel10.setEnabled(false);
            jLabel11.setEnabled(false);
            jLabel12.setEnabled(false);
            jLabel13.setEnabled(false);
            jLabel14.setEnabled(false);
            jLabel15.setEnabled(false);
            jLabel16.setEnabled(false);
            jLabel17.setEnabled(false);
            jLabel18.setEnabled(false);
            jLabel19.setEnabled(false);
            jLabel20.setEnabled(false);
            jLabel21.setEnabled(false);
            jLabel22.setEnabled(false);
            jLabel23.setEnabled(false);
            jLabel24.setEnabled(false);
            jLabel25.setEnabled(false);
            jLabel26.setEnabled(false);
            jLabel27.setEnabled(false);
            jLabel28.setEnabled(false);
            jLabel29.setEnabled(false);
            jLabel30.setEnabled(false);
            jLabel31.setEnabled(false);
            jLabel32.setEnabled(false);
            jLabel33.setEnabled(false);
            jLabel34.setEnabled(false);
            jLabel35.setEnabled(false);
            jTextField1.setEnabled(false);
            jTextField2.setEnabled(false);
            jTextField3.setEnabled(false);
            jTextField4.setEnabled(false);
            jTextField5.setEnabled(false);
            jTextField6.setEnabled(false);
            jTextField7.setEnabled(false);
            jTextField8.setEnabled(false);
            jTextField9.setEnabled(false);
            jTextField10.setEnabled(false);
            jTextField11.setEnabled(false);
            jTextField12.setEnabled(false);
            jTextField13.setEnabled(false);
            jTextField14.setEnabled(false);
            jTextField15.setEnabled(false);
            jTextField16.setEnabled(false);
            jTextField17.setEnabled(false);
            jTextField18.setEnabled(false);
            jTextField19.setEnabled(false);
            jTextField20.setEnabled(false);
            jTextField21.setEnabled(false);
            jTextField22.setEnabled(false);
            jTextField23.setEnabled(false);
            jTextField24.setEnabled(false);
            jTextField25.setEnabled(false);
            jTextField26.setEnabled(false);
            jTextField27.setEnabled(false);
            jTextField28.setEnabled(false);
            jTextField29.setEnabled(false);
            jTextField30.setEnabled(false);
            jTextField31.setEnabled(false);
            jTextField32.setEnabled(false);
            jTextField33.setEnabled(false);
            jTextField34.setEnabled(false);
            jTextField35.setEnabled(false);
            jRadioButton1.setEnabled(false);
            jRadioButton2.setEnabled(false);
            jRadioButton3.setEnabled(false);
            jRadioButton4.setEnabled(false);
            jRadioButton5.setEnabled(false);
            jRadioButton6.setEnabled(false);
            jRadioButton7.setEnabled(false);
            jRadioButton8.setEnabled(false);
            jRadioButton9.setEnabled(false);
            jRadioButton10.setEnabled(false);
            jRadioButton11.setEnabled(false);
            jRadioButton12.setEnabled(false);
            jRadioButton13.setEnabled(false);
            jRadioButton14.setEnabled(false);
            jRadioButton15.setEnabled(false);
            jRadioButton16.setEnabled(false);
            jRadioButton17.setEnabled(false);
            jRadioButton18.setEnabled(false);
            jRadioButton19.setEnabled(false);
            jRadioButton20.setEnabled(false);
            jRadioButton21.setEnabled(false);
            jRadioButton22.setEnabled(false);
            jRadioButton23.setEnabled(false);
            jRadioButton24.setEnabled(false);
            jRadioButton25.setEnabled(false);
            advanced = false;
        }
    }//GEN-LAST:event_jCheckBox2ActionPerformed

    private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
        if (jCheckBox1.isSelected()) {
            local = true;
            jCheckBox2.setEnabled(true);
            jSlider1.setEnabled(true);
            jSlider2.setEnabled(true);
        } else {
            local = false;
            jCheckBox2.setEnabled(false);
            jSlider1.setEnabled(false);
            jSlider2.setEnabled(false);
        }
    }//GEN-LAST:event_jCheckBox1ActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    private javax.swing.ButtonGroup buttonGroup4;
    private javax.swing.ButtonGroup buttonGroup5;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private static javax.swing.JCheckBox jCheckBox1;
    private static javax.swing.JCheckBox jCheckBox2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private static javax.swing.JLabel jLabel40;
    private static javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuBar jMenuBar2;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private static javax.swing.JProgressBar jProgressBar1;
    private static javax.swing.JProgressBar jProgressBar2;
    private static javax.swing.JProgressBar jProgressBar3;
    private static javax.swing.JProgressBar jProgressBar4;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButton10;
    private javax.swing.JRadioButton jRadioButton11;
    private javax.swing.JRadioButton jRadioButton12;
    private javax.swing.JRadioButton jRadioButton13;
    private javax.swing.JRadioButton jRadioButton14;
    private javax.swing.JRadioButton jRadioButton15;
    private javax.swing.JRadioButton jRadioButton16;
    private javax.swing.JRadioButton jRadioButton17;
    private javax.swing.JRadioButton jRadioButton18;
    private javax.swing.JRadioButton jRadioButton19;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JRadioButton jRadioButton20;
    private javax.swing.JRadioButton jRadioButton21;
    private javax.swing.JRadioButton jRadioButton22;
    private javax.swing.JRadioButton jRadioButton23;
    private javax.swing.JRadioButton jRadioButton24;
    private javax.swing.JRadioButton jRadioButton25;
    private javax.swing.JRadioButton jRadioButton3;
    private javax.swing.JRadioButton jRadioButton4;
    private javax.swing.JRadioButton jRadioButton5;
    private javax.swing.JRadioButton jRadioButton6;
    private javax.swing.JRadioButton jRadioButton7;
    private javax.swing.JRadioButton jRadioButton8;
    private javax.swing.JRadioButton jRadioButton9;
    private javax.swing.JScrollPane jScrollPane1;
    private static javax.swing.JSlider jSlider1;
    private static javax.swing.JSlider jSlider2;
    private javax.swing.JTabbedPane jTabbedPane1;
    private static javax.swing.JTextArea jTextArea1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField10;
    private javax.swing.JTextField jTextField11;
    private javax.swing.JTextField jTextField12;
    private javax.swing.JTextField jTextField13;
    private javax.swing.JTextField jTextField14;
    private javax.swing.JTextField jTextField15;
    private javax.swing.JTextField jTextField16;
    private javax.swing.JTextField jTextField17;
    private javax.swing.JTextField jTextField18;
    private javax.swing.JTextField jTextField19;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextField20;
    private javax.swing.JTextField jTextField21;
    private javax.swing.JTextField jTextField22;
    private javax.swing.JTextField jTextField23;
    private javax.swing.JTextField jTextField24;
    private javax.swing.JTextField jTextField25;
    private javax.swing.JTextField jTextField26;
    private javax.swing.JTextField jTextField27;
    private javax.swing.JTextField jTextField28;
    private javax.swing.JTextField jTextField29;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField30;
    private javax.swing.JTextField jTextField31;
    private javax.swing.JTextField jTextField32;
    private javax.swing.JTextField jTextField33;
    private javax.swing.JTextField jTextField34;
    private javax.swing.JTextField jTextField35;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTextField jTextField5;
    private javax.swing.JTextField jTextField6;
    private javax.swing.JTextField jTextField7;
    private javax.swing.JTextField jTextField8;
    private javax.swing.JTextField jTextField9;
    // End of variables declaration//GEN-END:variables
}
